package org.example.controller;


import lombok.extern.slf4j.Slf4j;
import org.example.pojo.LogQueryParam;
import org.example.pojo.OperateLog;
import org.example.pojo.PageResult;
import org.example.pojo.Result;
import org.example.service.LogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/log")
@Slf4j
public class LogController {

    @Autowired
    private LogService logService;

    @RequestMapping("/page")
    public Result page(LogQueryParam logQueryParam) {
        log.info("分页查询操作日志");
        PageResult<OperateLog> pageResult =logService.page(logQueryParam);
        return Result.success(pageResult);
    }
}
